package homework_3_27;

import java.util.Scanner;

/**
 * @author 猜数字
 *
 */
public class Hom_caishuzi {

    public static void main(String[] args) {
        int x=(int) (Math.random()*10)+1;
        System.out.println("随机数已经产生");
        System.out.println("开始猜吧");
        Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        while (x!=num)
        {
            if(num>x) {
                System.out.println("大了");
//                System.out.println("继续！！");
//                Scanner sr = new Scanner(System.in);
//                num = sr.nextInt();
            }
            else{
                System.out.println("小了");
                System.out.println("继续！！");


            }
            num=sc.nextInt();
        }
             System.out.println("猜对了");
    }
}
